package com.shijie.mapper;

import com.shijie.aop.annotation.AutoTimeFill;
import com.shijie.entity.Submit;
import com.shijie.vo.SubmitVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SubmitMapper {

    @AutoTimeFill({AutoTimeFill.PUT_TIME})
    boolean put(@Param("submit") Submit submit);

    List<Submit> listDefault(@Param("userId") Long userId);

    boolean changeStatus(@Param("submitId") Long submitId,
                         @Param("status") Submit.Status status);

    boolean setFailedMSg(@Param("submitId") Long submitId,
                         @Param("errorTip") String errorMsg);

    boolean setSucceedInfo(@Param("submitId") Long submitId,
                           @Param("useMilTime") Integer useMilTime,
                           @Param("useKbMemory") Integer useKbMemory);

    Submit get(@Param("submitId") Long submitId);
}
